// component/goodsCard/goodsCard.js
import {
  jump
} from '../../api/public'
Component({
  properties: {
    // 这里定义了innerText属性，属性值可以在组件使用时指定
    goodsList: {
      type: Object,
      value: {},
    },
    title: {
      type: String,
      value: ''
    },
    src: {
      type: String,
      value: ''
    },
    crosswise:{
      type: Number,
      value: 0
    }
  },
  /**
   * 页面的初始数据
   */
  data: {

  },

  methods: {
    goMore() {
      wx.switchTab({
        url: '/pages/onlineGarage/onlineGarage' ,
      })
    },
    goGoodsDetails(e) {
      console.log(e)
      var id = e.currentTarget.dataset.goodsId;
      if (!id) return false;
      wx.navigateTo({
        url: '/pages/goods/goods?goodsId=' + id+"&tabindex=2",
      })
    },
  }


})